import React, { Component } from 'react'
import '../css/select.css'

export default class Select extends Component {
  render() {
    let {list, current} = this.props;
    return (
      <div>
          <div className='father'>
            {list.map((item,index) =>
                <div key={item.id} className={current === index? 'active':''} onClick={()=>{
                    this.props.event(index)
                }}>
                    {item.neirong}
                </div>)
            }
          </div>
      </div>
    )
  }
}
